package com.hzf.booklibrary.bean;

import com.hzf.booklibrary.bean.base.Base;

import java.io.Serializable;
import java.util.List;


public class Recommend extends Base {

    public String code;

    public RespsoseMsg result;

    public static class RespsoseMsg implements Serializable{
        public String currentPage;
        public String firstIndex;
        public String firstPage;
        public String totalPages;
        public List<RecommendBooks> items;
    }

    public static class RecommendBooks implements Serializable {

        public String author;//图书作者
        public String icon_path ="";//封面路径
        public String id;//图书id
        public String name;//图书名称
        public String filetype;//图书类型
        public String path = "";//图书路径
        public String updatetime = "";//更新日期
        public String content = "";//简介
        public boolean isFromSD = true;

        public int chaptersCount=1;


        @Override
        public boolean equals(Object obj) {
            if (obj instanceof RecommendBooks) {
                RecommendBooks bean = (RecommendBooks) obj;
                return this.id.equals(bean.id);
            }
            return super.equals(obj);
        }

        @Override
        public int hashCode() {
            return this.id.hashCode();
        }
    }
}
